using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PACKETPARSERMAX20.CORE
{
	public class creature_questrelation : MangosBase
	{
		public System.UInt32? id;
		public System.UInt32? quest;




		public override string GetInsertCommand()
		{
			return string.Format("INSERT IGNORE INTO `creature_questrelation` (`id`, `quest`) VALUES ('{0}', '{1}');", id.GetValueOrDefault(), quest.GetValueOrDefault());
		}


		public override string GetUpdateCommand()
		{
            StringBuilder sb = new StringBuilder();
						sb.Append("UPDATE `creature_questrelation` SET ");
			if(quest != null)
			{
				sb.AppendLine("`quest`='" + quest.Value.ToString() + "'");
			}
				sb = sb.Replace("\r\n", ", ");
				sb.Append(" WHERE `id`='" + id.Value.ToString() + "';");
				sb = sb.Replace(",  WHERE", " WHERE");

            return sb.ToString();
		}


	}
}
